//package com.bigShen.spring.mybatis.config;
//
//import org.apache.ibatis.executor.loader.cglib.CglibProxyFactory;
//import org.apache.ibatis.session.SqlSessionFactory;
//import org.mybatis.spring.SqlSessionFactoryBean;
//import org.mybatis.spring.annotation.MapperScan;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Lazy;
//import org.springframework.transaction.annotation.EnableTransactionManagement;
//
//import javax.sql.DataSource;
//
///**
// * @Author eddy.shen
// * @Date 2018/12/22 10:47
// **/
//@Configuration
//@MapperScan(basePackages = {"com.bigShen.spring.mybatis"})
//@EnableTransactionManagement(proxyTargetClass = true)
//public class MyBatisConfig {
//
//    @Autowired
//    @Qualifier("dataSource")
//    private DataSource dataSource;
//
//    @Lazy(false)
//    @Bean(name = "sqlSessionFactory")
//    public SqlSessionFactory localSessionFactoryBean() throws Exception {
//
//        SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
//        sqlSessionFactoryBean.setDataSource(dataSource);
////        sqlSessionFactoryBean.setTypeAliasesSuperType();
////        sqlSessionFactoryBean.setTypeHandlers();
////        sqlSessionFactoryBean.setPlugins();
//        SqlSessionFactory sqlSessionFactory = sqlSessionFactoryBean.getObject();
//        sqlSessionFactory.getConfiguration().setLazyLoadingEnabled(true);
//        sqlSessionFactory.getConfiguration().setAggressiveLazyLoading(false);
//        sqlSessionFactory.getConfiguration().setProxyFactory(new CglibProxyFactory());
//
//
//
//
//
//    }
//
//
//}
